package com.cl.service.impl;

import com.cl.mapper.SituationMapper;
import com.cl.pojo.Situation;
import com.cl.service.SituationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SituationServiceImpl implements SituationService {
    @Autowired
    SituationMapper situationMapper;
    @Override
    public int addSituation(int sNo, String qDate, String qReaction,String yes) {
        return situationMapper.addSituation(sNo,qDate,qReaction,yes);
    }

    @Override
    public Situation queryBySno(int sNo) {
        return situationMapper.queryBySno(sNo);
    }

    @Override
    public List<Map<String, Object>> querySituation(int page, int limit,String name,String yon) {
        return situationMapper.querySituation(page, limit,name,yon);
    }

    @Override
    public int countAll() {
        return situationMapper.countAll();
    }

    @Override
    public int countAbnormal() {
        return situationMapper.countAbnormal();
    }

    @Override
    public int countNormal() {
        return situationMapper.countNormal();
    }
}
